import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
import api from 'http/api.js'
import mixin from 'components/mixin.js'
import toast from 'utils/toast/toast.js'
import store from './store'
import navBar from './components/navBar/navBar'
import selectAddress from './components/selectAddress/selectAddress'
import selectMenu from './components/selectMenu/selectMenu'
import uploadImg from './components/uploadImg/uploadImg'
import messageBoxa from './components/messageBoxa/messageBoxa'
import hintBox from './components/hintBox/hintBox'
import pullUp from './components/pullUp/pullUp'
import goodsList from './components/goodsList/goodsList'

import zhButton from '@/components/zhButton/zhButton'

Vue.config.productionTip = false
App.mpType = 'app'

Vue.use(uView);
Vue.mixin(mixin)

Vue.component('navBar', navBar)
Vue.component('selectAddress', selectAddress)
Vue.component('selectMenu', selectMenu)
Vue.component('uploadImg', uploadImg)
Vue.component('messageBoxa', messageBoxa)
Vue.component('hintBox', hintBox)
Vue.component('pullUp', pullUp)
Vue.component('goodsList', goodsList)
Vue.component('zhButton', zhButton)

Vue.prototype.$api = api

Vue.prototype.$toast = toast
Vue.prototype.$store = store

Vue.prototype.$http = ''

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
